package com.tom.demo.web.product;

import com.tom.demo.common.response.Result;
import com.tom.demo.service.product.AttributeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Api(tags = "属性管理")
@RestController
@RequestMapping("/product")
public class AttributeController {

    @Resource
    private AttributeService attributeService;

    @GetMapping(path = {"/attribute/parentId"})
    @ApiOperation(value = "根据parentId获取属性分类")
    public Result parentId(@RequestParam(value = "parentId",required = false)String parentId){

        return attributeService.parentId(parentId);
    }
}
